'use strict';
exports = module.exports = function($scope, $ajax) {
    $scope.alerts = [
        { type: 'info', msg: '使用的是 bootstrap 的样式 bui 功能增强' },
        { type: 'success', msg: '好消息是这种 ng-repeat 方式使用方便' },
        { type: 'warning', msg: '但是怎么做成服务来给代码逻辑提供方便' },
        { type: 'danger', msg: '不用 ng-repeat 没法删除'}
    ];
    $scope.closeAlert = function(index) {
        $scope.alerts.splice(index, 1);
    };
    $scope.addAlert = function() {
        $scope.alerts.push({type: 'danger', msg: 'Oh snap! Change a few things up and try submitting again.'});
    };
}